import service from "@/utils/request.js";

const categoryApi = {
	//添加
	insert(category) {
		return service.post("/category", category);
	},
	//删除
	delete(id) {
		return service.delete(`/category/${id}`);
	},
	//修改
	update(category) {
		return service.put("/category", category);
	},
	//分页搜索
	selectTopCategoryList() {
		return service.get("/product/category/selectTopCategoryList")
	}
};

export default categoryApi;